﻿function Profile(data) {
    this.Id = ko.observable(data.Id ? data.Id : 0);
    this.Created = ko.observable(data.Created ? data.Created : "");
    this.Updated = ko.observable(data.Updated ? data.Updated : "");
    this.Title = ko.observable(data.Title ? data.Title : "").extend({
            required: true,
            maxLength: 50
        });
    this.Description = ko.observable(data.Description ? data.Description : "").extend({
            required: true,
            maxLength: 1024
        });
    this.DescriptionShort = ko.observable(data.Description ? data.Description.length > 100 ? data.Description.substring(0, 100) + "..." : data.Description : "");
    this.Website = ko.observable(data.Website ? data.Website : "http://").extend({
            maxLength: 50
        });
    this.Skype = ko.observable(data.Skype ? data.Skype : "").extend({
            maxLength: 50
        });
    this.Facebook = ko.observable(data.Facebook ? data.Facebook : "").extend({
            maxLength: 50
        });
    this.Twitter = ko.observable(data.Twitter ? data.Twitter : "").extend({
            maxLength: 50
        });
    this.Linkedin = ko.observable(data.Linkedin ? data.Linkedin : "").extend({
            maxLength: 50
        });
    this.HourRate = ko.observable(data.HourRate ? data.HourRate : 0).extend({
            number: true
        });
    this.DailyRate = ko.observable(data.DailyRate ? data.DailyRate : 0).extend({
            number: true
        });
    this.MonthlyRate = ko.observable(data.MonthlyRate ? data.MonthlyRate : 0).extend({
            number: true
        });
    this.AnnualRate = ko.observable(data.AnnualRate ? data.AnnualRate : 0).extend({
            number: true
        });
    this.CommentRate = ko.observable(data.CommentRate ? data.CommentRate : "").extend({
            maxLength: 100
        });
    this.JobType = ko.observable(data.JobType ? data.JobType : null).extend({
            required: true
        });
    this.JobTypeText = ko.observable(data.JobTypeText ? data.JobTypeText : "");
    this.JobTypes = ko.observableArray(data.JobTypes ? data.JobTypes : []);
    this.Experience = ko.observable(data.Experience ? data.Experience : "").extend({
            maxLength: 4000
        });
    this.References = ko.observable(data.References ? data.References : "").extend({
            maxLength: 4000
        });
    this.Availability = ko.observable(data.Availability ? data.Availability : "").extend({
            maxLength: 4000
        });
    this.Other = ko.observable(data.Other ? data.Other : "").extend({
            maxLength: 4000
        });
    this.AvailabilityStatus = ko.observable(data.AvailabilityStatus ? data.AvailabilityStatus : 0);
    this.AvailabilityStatusText = ko.observable(data.AvailabilityStatusText ? data.AvailabilityStatusText : "");
    this.Photo = ko.observable(data.Photo ? data.Photo : "../../Content/img/250X250_Office-Male-icon.png").extend({
            maxLength: 250
        });
    this.Photo150X150 = ko.observable(data.Photo150X150 ? data.Photo150X150 : "../../Content/img/150X150_Office-Male-icon.png").extend({
            maxLength: 250
        });
    this.Photo80X80 = ko.observable(data.Photo80X80 ? data.Photo80X80 : "../../Content/img/80X80_Office-Male-icon.png").extend({
            maxLength: 250
        });
    this.Photo50X50 = ko.observable(data.Photo50X50 ? data.Photo50X50 : "../../Content/img/50X50_Office-Male-icon.png").extend({
            maxLength: 250
        });
    this.Cv = ko.observable(data.Cv ? data.Cv : "Cv_default").extend({
            maxLength: 250
        });
    this.Location = ko.observable(data.Location ? data.Location : "").extend({
            maxLength: 100
        });
    this.Email = ko.observable(data.Email ? data.Email : "").extend({
            maxLength: 50,
            email: true,
            required: false
        });
    this.PhoneNumber = ko.observable(data.PhoneNumber ? data.PhoneNumber : "").extend({
            maxLength: 50,
            number: true,
            required: false
        });
    this.CountryFlag = ko.observable(data.CountryFlag ? data.CountryFlag : "");
    this.IsAuthenticated = ko.observable(data.IsAuthenticated ? data.IsAuthenticated : false);
    this.IsDefault = ko.observable(data.IsDefault ? data.IsDefault : false);
    this.EducationSkills = ko.observableArray(data.EducationSkills ? data.EducationSkills : []);
    this.LanguageSkills = ko.observableArray(data.LanguageSkills ? data.LanguageSkills : []);
    this.CategorySkills = ko.observableArray(data.CategorySkills ? data.CategorySkills : []);
    this.TechnologySkills = ko.observableArray(data.TechnologySkills ? data.TechnologySkills : []);
    this.UserId = ko.observable(data.UserId ? data.UserId : 0);
    this.Country = ko.observable(data.Country ? data.Country : null).extend({
            required: true
        });
    this.CountryId = ko.observable(data.CountryId ? data.CountryId : 0);
    this.Industry = ko.observable(data.Industry ? data.Industry : null).extend({
            required: true
        });
    this.IndustryId = ko.observable(data.IndustryId ? data.IndustryId : 0);
    this.errors = ko.validation.group(this);
    return;
}